<template>
  <note-editor 
    :is-edit-mode="true" 
    :initial-data="noteData" 
    @submit="handleUpdateNote"
  />
</template>

<script>
export default {
  data() {
    return {
      noteData: {}
    }
  },
  methods: {
    handleUpdateNote(updatedData) {
      // 调用API更新笔记
      console.log('更新笔记:', updatedData)
    }
  },
  onLoad(options) {
    this.noteData=JSON.parse(decodeURIComponent(options.note))
  }
}
</script>